﻿@model List<XT.Exam.MODEL.TestPaper>
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <link href="~/Content/static/h-ui/css/H-ui.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="~/Content/static/h-ui.admin/css/style.css" />
    <meta name="viewport" content="width=device-width" />
    <style>
        #reault {
            cursor: not-allowed;
        }
    </style>
    <title></title>
</head>
<body>
    <div class="pd-20">
        <table class="table table-border table-bordered table-hover table-bg table-sort">
            <thead>
                <tr class="text-c">
                    <th>试卷名称</th>
                    <th>是否开放</th>
                    <th>开始时间</th>
                    <th>时长</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                @{
                    foreach (var item in Model)
                    {
                        <tr class="text-c">
                            <td><input value="@item.ID" id="Id" type="hidden" />  @item.TestPaper_Name</td>
                            <td>开放</td>
                            <td>@item.BeginExam</td>
                            <td>@item.EndTime 分钟</td>
                            <td>
                                <input type="button" value="开始考试" onclick="location.href = '/Student/BeginExam?ID=@item.ID'" class="btn btn-primary radius" style="width:100px;" />
                            </td>
                        </tr>
                    }
                }
            </tbody>
        </table>
        <div id="pageNav" class="pageNav"></div>
    </div>
    <!--_footer 作为公共模版分离出去-->
    <script type="text/javascript" src="~/Content/lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="~/Content/lib/layer/2.4/layer.js"></script>

    <script type="text/javascript" src="~/Content/static/h-ui/js/H-ui.min.js"></script>
    <script type="text/javascript" src="~/Content/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->
    <!--请在下方写此页面业务相关的脚本-->

    <script src="~/JS/TestPaperJS.js"></script>

    <script>
        /*资讯-添加*/
        function user_add(title, url) {
            var index = layer.open({
                type: 2,
                title: title,
                content: url
            });
            layer.full(index);
        }

        function del() {
            var ID = $("#Id").val();
            alert(ID);
            $.ajax({
                type: "post",
                url: "/SysUserInfo/DeleteTestPaPer",
                data: {ID:ID},
                success: function (result) {
                    if (result > 0) {
                        alert("删除成功");

                    }
                    else {
                        alert("删除失败")
                    }
                    location.href = "/SysUserInfo/TestPaPerList";
                }
            })
        }
    </script>
</body>

</html>

